// 在键盘按下并释放及提交后验证提交表单
$("#siForm").validate({
    errorPlacement: function (error, element) {
        // Append error within linked label
        $(element)
            .closest("form")
            .find("label[for='" + element.attr("id") + "']")
            .append(error);
    },
    errorElement: "span",
    success: function (label) {
        /*label的默认正确样式为valid，需要通过validClass来重置，否则这里添加的其他样式不能被清除*/
        label.text('').addClass('success');
    },
    rules: {
        name: {
            required: true,
            rangelength: [5, 10]
        },
        email: {
            required: true,
            email: true
        },
    },
    messages: {
        email: {
            required: "请输入邮箱",
            email: '请输入正确的邮箱'
        },

    }
})